﻿using System.Web.Mvc;

namespace LbangCMS.Areas.Admin
{
    public class AdminAreaRegistration : AreaRegistration 
    {
        public override string AreaName 
        {
            get 
            {
                return "Admin";
            }
        }

        public override void RegisterArea(AreaRegistrationContext context)
        {
            context.MapRoute(
               "Admin_Index",
               "Admin/index.html",
               new { action = "Index", controller = "Home", id = UrlParameter.Optional },
               null,
               new string[] { "LbangCMS.Areas.Admin.Controllers" }
            );
            context.MapRoute(
                 "Admin_Login",
                 "Admin/login.html",
                 new { action = "Login", controller = "Account", id = UrlParameter.Optional },
                 null,
                 new string[] { "LbangCMS.Areas.Admin.Controllers" }
            );
            context.MapRoute(
                "Admin_Logout",
                "Admin/logout.html",
                new { action = "Login", controller = "Account", id = UrlParameter.Optional },
                null,
                new string[] { "LbangCMS.Areas.Admin.Controllers" }
            );
            context.MapRoute(
                "Admin_default",
                "Admin/{controller}/{action}/{id}",
                new { action = "Index", controller = "Home", id = UrlParameter.Optional },
                null,
                new string[] { "LbangCMS.Areas.Admin.Controllers" }
            );
        }
    }
}